def input_pwd():
    pwd = input('请输入密码:')
    if len(pwd) >= 8:
        return pwd
    ex = Exception('密码最小为8位数')
    raise ex


print(input_pwd())
